import service from '@/utils/request'

export function createPostService(data) {
  return service({
    url: "/post/createPost",
    method: "post",
    data,
  });
}

export function deletePostService(postId) {
  return service({
    url: `/post/deletePost/${postId}`,
    method: "delete"
  });
}

export function getPostByIdService(postId) {
  return service({
    url: `/post/${postId}`,
    method: "get"
  });
}

export function updatePostService(data) {
  return service({
    url: "/post/updatePost",
    method: "put",
    data
  });
}